package com.lxy.auth.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lxy.auth.dto.UserDto;
import com.lxy.auth.mapper.UserMapper;
import com.lxy.auth.service.UserService;
import com.lxy.bo.UserInfoInTokenBO;
import com.lxy.common.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Override
    public AjaxResult<UserInfoInTokenBO> getUserInfoInTokenByInputUserNameAndPassword(String username, String password, Integer sysType) {
        return null;
    }

    @Autowired
    UserMapper userMapper;
    @Override
    public int checkUser(String username) {
        return userMapper.queryUserByUserName(username);
    }

    @Override
    public UserDto queryByAccount(String username) {
        QueryWrapper queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username",username);
        UserDto userDto = userMapper.selectOne(queryWrapper);
        return userDto;
    }
}
